import * as types from '../constants/ActionTypes'
import {Debug_CheckUser} from '@/api/debug'

const Login = data => ({
    type:types.DEBUG_LOGIN,
    data
})

export const LoginAction = data => (dispatch, getState) => {
    return dispatch => {
        return Debug_CheckUser(data).then(res=>{
            dispatch(Login(res.list))
        })
    }
}


export function LoginHandle(data){
    return dispatch => {
        return Debug_CheckUser(data).then(res=>{
            dispatch(Login(res.list))
        }).catch(e=>{
            console.log('失败了')
        })
    }
}